package com.bckj.fastboot.iot.mq.redis.producer;

import com.bckj.fastboot.core.redis.RedisOps;
import com.bckj.fastboot.iot.common.constant.IotMQConstants;
import com.bckj.fastboot.iot.common.dto.msg.IotDeviceMessage;
import com.bckj.fastboot.iot.common.mq.producer.IotDeviceMessageProducer;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * IotDeviceMessageProducer
 *
 * @author wfc
 **/
@Component
public class IotDeviceMessageProducerImpl implements IotDeviceMessageProducer {

    @Resource
    private RedisOps redisOps;

    @Override
    public void send(IotDeviceMessage message) {
        redisOps.llPush(IotMQConstants.IOT_DEVICE_TOPIC, message);
    }
}
